package com.csii.itest;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Map;

import org.apache.poi.xwpf.converter.pdf.PdfOptions;

public class PdfWater {

	//protected static final Logger logger = LoggerFactory.getLogger(WordPdfUtils.class);
	
    public static void main(String[] args) throws Exception{
//        wordToPdf("d:\\1484279799209tongYeFinanceFiles.docx","d:\\1484279799209tongYeFinanceFiles.pdf");
//        wordToPdf("d:\\1481523801782tongYeFinanceFiles.docx","f:\\1481523801782tongYeFinanceFiles.pdf");
//        wordToPdf("d:\\1481875753224financeProdFiles.docx","f:\\1481875753224financeProdFiles.pdf");
////        wordToPdf("d:\\1481876412744financeProdFiles.docx","f:\\1481876412744financeProdFiles.pdf");
//        wordToPdf("d:\\csii20170406wangjianghui.docx","f:\\csii20170406wangjianghui.pdf");
//        wordToPdf("d:\\financeProdFiles.docx","f:\\financeProdFiles.pdf");
//        wordToPdf("d:\\priseManagementFiles.docx","f:\\priseManagementFiles.pdf");
//        wordToPdf("d:\\tongYeFinanceFiles.docx","f:\\tongYeFinanceFiles.pdf");
    }
//    public static void excel2pdf(String Address) {               
////    	if (!getLicense()) {          // 验证License 若不验证则转化出的pdf文档会有水印产生           
////    	return;       
////    	}       
//    	try {           
//    	File pdfFile = new File("C:/inetpub/wwwroot/web/file/pdf1.pdf");// 输出路径           
//    	Workbook wb = new Workbook(Address);// 原始excel路径                        
//    	FileOutputStream fileOS = new FileOutputStream(pdfFile);           
//    	wb.save(fileOS, SaveFormat.PDF);             
//    	fileOS.close();                 
//    	}
//    	catch (Exception e) {           
//    	e.printStackTrace();       
//    	}   
//    	}
    	
    
    
    
    /**
     * 将加水印pdf
     * @param filepath 源文件路径， 必须为pdf文档
     * @param outpath 目标文件路径
     * @param 
     * @throws Exception
     */
    public static void pdfWater(String InPdfFile,String outPdfFile, String markImagePath, int pageSize) throws Exception {
//    	InputStream source = new FileInputStream(filepath);
//        OutputStream target = new FileOutputStream(outpath);
        Map<String, String> params = new HashMap<String, String>();
        
        PdfOptions options = PdfOptions.create();
	}
    

   
	
	
}
